import { Injectable } from '@angular/core';

@Injectable({
  providedIn: 'root'
})
export class LayerMessageService {

  constructor() { }
  publishControllLayer(msg) {
    postal.channel('MAP_TREE_CHANNEL').publish('nodeinfo', msg);
  }
  clearSpecleLayer(layerList) {
    if (!Array.isArray(layerList)) {
      return;
    }
    layerList.forEach(element => {
      postal.channel('MAP_TREE_CHANNEL').publish('nodeinfo', { rlayer: element.rlayer, active: false });
    });
  }
}
